package cn.school.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 提醒记录表
 * @TableName reminders
 */
@TableName(value ="reminders")
@Data
public class Reminders implements Serializable {
    /**
     * 
     */
    @TableId
    private Integer id;

    /**
     * 关联的任务ID
     */
    private Integer taskId;

    /**
     * 提醒类型
     */
    private Integer reminderType;

    /**
     * 提醒发送时间
     */
    private Date reminderTime;

    /**
     * 提醒内容
     */
    private String context;

    /**
     * 创建者id(系统或者教师)
     */
    private Integer createdBy;

    /**
     * 创建时间
     */
    private Date createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Reminders other = (Reminders) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getReminderType() == null ? other.getReminderType() == null : this.getReminderType().equals(other.getReminderType()))
            && (this.getReminderTime() == null ? other.getReminderTime() == null : this.getReminderTime().equals(other.getReminderTime()))
            && (this.getContext() == null ? other.getContext() == null : this.getContext().equals(other.getContext()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getReminderType() == null) ? 0 : getReminderType().hashCode());
        result = prime * result + ((getReminderTime() == null) ? 0 : getReminderTime().hashCode());
        result = prime * result + ((getContext() == null) ? 0 : getContext().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", taskId=").append(taskId);
        sb.append(", reminderType=").append(reminderType);
        sb.append(", reminderTime=").append(reminderTime);
        sb.append(", context=").append(context);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}